import { pickedModelData, pickedLineData, pickedFaceData } from '@amcax/base';

type CircularArrayMode = 'circle' | 'doubleCircle';
export type AngleMode = 'distance' | 'angle';

export interface ArraySettings {
  angleMode?: AngleMode;
  count: number;
  angle: number;
  singleAngle: number; // extra field to hold the default value while switching mode
}

export interface FormData {
  mode: CircularArrayMode;

  base: pickedModelData;
  axis: pickedLineData | pickedFaceData;

  array1: ArraySettings;
  reverse: boolean;

  array2: ArraySettings;
  equal: boolean;
}

export interface Params {
  mode: CircularArrayMode;

  axis: string;

  angleMode?: AngleMode;
  count: number;
  angle: number;
  distance?: number; // only exists for old API params
  reverse: boolean;

  angleMode1?: AngleMode;
  count1: number;
  angle1: number;
  distance1?: number; // ditto

  angleMode2?: AngleMode;
  count2: number;
  angle2: number;
  distance2?: number; // ditto

  equal: boolean;
}
